package svc

import (
	"cart-go/api/internal/config"
	"cart-go/cartrpc/cartrpcclient"
	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config  config.Config
	CartRpc cartrpcclient.Cartrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:  c,
		CartRpc: cartrpcclient.NewCartrpc(zrpc.MustNewClient(c.CartRpc)),
	}
}
